#encoding: utf-8
from flask_mail import Message
from flask import current_app, render_template
from . import mail

def send_email(email, user, token):
    print("----to----")
    print(email)
    msg = Message("邮件认证", sender="刘文超博客 <liuwenchao1990@163.com>", recipients=[email])
    msg.html = render_template("confirm_email.html", user=user, token=token)
    mail.send(msg)
